package com.cz.nongyetongv5.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.cz.nongyetongv5.R;
import com.cz.nongyetongv5.bean.EntProduct;

public class EntInfoTransDetailActivity extends Activity {


    private TextView tv_type;
    private TextView tv_name;
    private TextView tv_count;
    private TextView tv_fangxiang;
    private EntProduct entProduct;
    private RelativeLayout rl_back;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ent_info_trans_detail);
        tv_type = findViewById(R.id.tv_type);
        tv_name = findViewById(R.id.tv_name);
        tv_count = findViewById(R.id.tv_count);
        tv_fangxiang = findViewById(R.id.tv_fangxiang);
        rl_back=findViewById(R.id.rl_back);
        rl_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        entProduct = (EntProduct) getIntent().getSerializableExtra("entProduct");
        if (entProduct != null) {
            tv_type.setText(entProduct.getProduce_name());
            tv_name.setText(entProduct.getName());
            tv_count.setText(entProduct.getOutput_amount() + entProduct.getOutput_group_name());
            tv_fangxiang.setText(entProduct.getTarget());
        }
    }
}
